]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Always set a source tag on GTasks
authorBilal Elmoussaoui <belmouss@redhat.com>
Tue, 14 Apr 2026 17:26:10 +0000 (19:26 +0200)
committerBilal Elmoussaoui <belmouss@redhat.com>
Tue, 14 Apr 2026 17:26:10 +0000 (19:26 +0200)
Helps with debugging/profiling.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4176>

src/hotplug-sniffer/shell-mime-sniffer.c
src/shell-polkit-authentication-agent.c
src/shell-screenshot.c
src/shell-util.c
src/st/st-icon-theme.c
src/st/st-image-content.c
src/st/st-texture-cache.c

index b4d6d43899cfbcd0d7bf5fcbc8d2b398a19e370a..5b77b107cd09eb207b23dcc955e696a18e722e48 100644 (file)
@@ -561,6 +561,7 @@ shell_mime_sniffer_sniff_async (ShellMimeSniffer *self,
   self->cancellable = g_cancellable_new ();
   self->task = g_task_new (self, self->cancellable,
                            callback, user_data);
+  g_task_set_source_tag (self->task, shell_mime_sniffer_sniff_async);
 
   self->watchdog_id =
     g_timeout_add_once (WATCHDOG_TIMEOUT,
index 62676bd121e4a42da6dce1e3bb21c39dafd396c9..7b000644fb083709dce6e78972120b3e4ce8bc4a 100644 (file)
@@ -396,6 +396,7 @@ initiate_authentication (PolkitAgentListener  *listener,
   request->identities = g_list_copy (identities);
   g_list_foreach (request->identities, (GFunc) g_object_ref, NULL);
   request->simple = g_task_new (listener, NULL, callback, user_data);
+  g_task_set_source_tag (request->simple, initiate_authentication);
   request->cancellable = cancellable;
   request->handler_id = g_cancellable_connect (request->cancellable,
                                                G_CALLBACK (on_request_cancelled),
index facb6b53067b7f2c01387c0d0f105b0f62f343b4..076eb2c9f2141cea20276ed8ad9054a4047ee5bc 100644 (file)
@@ -450,6 +450,7 @@ grab_screenshot (ShellScreenshot     *screenshot,
   screenshot->screenshot_area.height = height;
 
   task = g_task_new (screenshot, NULL, on_screenshot_written, result);
+  g_task_set_source_tag (task, grab_screenshot);
   g_task_run_in_thread (task, write_screenshot_thread);
   g_object_unref (task);
 }
@@ -629,6 +630,7 @@ grab_window_screenshot (ShellScreenshot     *screenshot,
   g_signal_emit (screenshot, signals[SCREENSHOT_TAKEN], 0, &rect);
 
   task = g_task_new (screenshot, NULL, on_screenshot_written, result);
+  g_task_set_source_tag (task, grab_window_screenshot);
   g_task_run_in_thread (task, write_screenshot_thread);
   g_object_unref (task);
 }
@@ -877,6 +879,7 @@ shell_screenshot_screenshot_area (ShellScreenshot     *screenshot,
                   (MtkRectangle *) &screenshot->screenshot_area);
 
   task = g_task_new (screenshot, NULL, on_screenshot_written, result);
+  g_task_set_source_tag (task, shell_screenshot_screenshot_area);
   g_task_run_in_thread (task, write_screenshot_thread);
 }
 
index 382fa2b45992ea3a3f4ba45933145839d8fd0717..2ccf6242647307ca31dc2d2c185c1c7a3ef84843 100644 (file)
@@ -619,6 +619,7 @@ shell_util_systemd_call (const char           *command,
                          gpointer              user_data)
 {
   g_autoptr (GTask) task = g_task_new (NULL, cancellable, callback, user_data);
+  g_task_set_source_tag (task, shell_util_systemd_call);
   g_autoptr (GVariant) params_owned = g_variant_ref_sink (g_steal_pointer (&params));
 
 #ifdef HAVE_SYSTEMD
index da84cfa21a2fda9c8c42f3d7225ac22179f398bb..5dd04fb37d6543a3667803fc9bbc4ad888638979 100644 (file)
@@ -3514,6 +3514,7 @@ st_icon_info_load_icon_async (StIconInfo          *icon_info,
   GError *error = NULL;
 
   task = g_task_new (icon_info, cancellable, callback, user_data);
+  g_task_set_source_tag (task, st_icon_info_load_icon_async);
 
   if (icon_info_get_pixbuf_ready (icon_info))
     {
@@ -4063,6 +4064,7 @@ st_icon_info_load_symbolic_async (StIconInfo          *icon_info,
   g_return_if_fail (colors != NULL);
 
   task = g_task_new (icon_info, cancellable, callback, user_data);
+  g_task_set_source_tag (task, st_icon_info_load_symbolic_async);
 
   data = g_new0 (AsyncSymbolicData, 1);
   g_task_set_task_data (task, data, (GDestroyNotify) async_symbolic_data_free);
index 9cd0d48f10b645f129b31e1d83e01152ea3f2d4f..684382b5e20ce3f28c2b5eea5cb66a479b89025a 100644 (file)
@@ -316,6 +316,7 @@ st_image_load_async (GLoadableIcon       *icon,
   g_autoptr (GTask) task = NULL;
 
   task = g_task_new (icon, cancellable, callback, user_data);
+  g_task_set_source_tag (task, st_image_load_async);
   g_task_set_task_data (task, GINT_TO_POINTER (size), NULL);
   g_task_run_in_thread (task, load_image_thread);
 }
index daba9f6bb0790209524fd680c7b7dddd6da5dfce..7d46df45e126b3c55102e2822ae9e2343271a447 100644 (file)
@@ -791,6 +791,7 @@ load_texture_async (StTextureCache       *cache,
   if (data->file)
     {
       GTask *task = g_task_new (cache, NULL, on_pixbuf_loaded, data);
+      g_task_set_source_tag (task, load_texture_async);
       g_task_set_task_data (task, data, NULL);
       g_task_run_in_thread (task, load_pixbuf_thread);
       g_object_unref (task);